﻿<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/8/22
  Time: 11:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String openId = request.getSession().getAttribute("openId") + "";
%>
<!DOCTYPE html>
<html>
<head>
    <%--<meta http-equiv="Access-Control-Allow-Origin" content="open.weixin.qq.com">--%>
    <title>新西兰微助手</title>
    <%@include file="../../include/header.jsp" %>

    <style>
        a:hover, a:visited, a:active, a:link {
            text-decoration: none;
            color: black;
        }

        #coupon, #shop {
            margin-left: 10%;
        }

        #select label {
            font-family: -apple-system, SF UI Text, Helvetica Neue, Helvetica, Arial, sans-serif;
            font-size: 14px;
            line-height: 1.4;
            font-weight: 100;
        }

        table {
            width: 100%;
        }

        table tr {
            width: 30%;
        }

        table tr td {
            text-align: center;
            height: 40px;
        }

        .row {
            background-color: #FFFFFF;
            margin-bottom: 10px;
        }

        .row .indexToolbar {
            text-align: center;
            line-height: 40px;
            height: 40px;
            margin: 10px 0;
            font-size: 14px;
            color: #4B4C4C;
        }

        .item-title{
            color:black;
            font-size:18px;
            font-weight:normal;
            text-align: left;
            width:50%;
        }
        .item-input{
            width:50%;
        }
        .item-input input{
            text-align: right;
        }
        .list-block .beizhu::after{
            height:0px;
        }

        .search-data-order-by{
            border-bottom: 1px solid #509AF1;
            font-weight: bold;
        }
    </style>
</head>
<body>
<!-- Status bar overlay for full screen mode (PhoneGap) -->
<div class="statusbar-overlay"></div>
<!-- Panels overlay-->
<div class="panel-overlay"></div>
<!-- Views -->
<div class="views">
    <!-- Your main view, should have "view-main" class -->
    <div class="view view-main">
        <!-- Top Navbar-->
        <div class="navbar">
            <div class="navbar-inner">
                <!-- We need cool sliding animation on title element, so we have additional "sliding" class -->
                <div class="center sliding">Verification</div>
            </div>
        </div>
        <!-- Pages container, because we use fixed-through navbar and toolbar, it has additional appropriate classes-->
        <div class="pages navbar-through toolbar-through">
            <!-- Page, "data-page" contains page name -->
            <div class="page" data-page="index">
                <!-- Scrollable page content -->
                <div class="page-content">
                    <div class="list-block">
                        <ul>
                            <li>
                                <label class="label-radio item-content">
                                    <input type="radio" name="typeId" value="23" checked="checked">
                                    <div class="item-media">
                                        <i class="icon icon-form-radio"></i>
                                    </div>
                                    <div class="item-inner">
                                        <div class="item-title">Tickets</div>
                                    </div>
                                </label>
                            </li>
                            <li>
                                <label class="label-radio item-content">
                                    <input type="radio" name="typeId" value="24">
                                    <div class="item-media">
                                        <i class="icon icon-form-radio"></i>
                                    </div>
                                    <div class="item-inner">
                                        <div class="item-title">Chartered</div>
                                    </div>
                                </label>
                            </li>
                            <li>
                                <div class="item-inner" style="padding-left:15px">
                                    <div class="item-title label">verifyCode:</div>
                                    <div class="item-input">
                                        <input type="text" id="verifyCode" placeholder="Your Verify Code">
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <!-- Bottom Toolbar-->
        <div class="toolbar" style="height:60px;" id="index-tool">
            <div class="toolbar-inner" style="background-color:white;">
                <a class="button" id="toolbar-button" onclick="verify()"
                   style="width:60%;margin-left: 20%;background-color:#509AF1;color:white;height:40px;line-height:40px;
                   border-radius:2px;">Submit</a>
            </div>
        </div>
    </div>
</div>

<%@include file="../../include/footer.jsp" %>
<script>
    var myApp = new Framework7();
    var $$ = Framework7.$;
    var mainView = myApp.addView('.view-main');
    function verify(){
        var typeId = $("input:radio[name='typeId']:checked").val();
        var verifyCode =$("#verifyCode").val();
        if(verifyCode){
            myApp.showPreloader();
            var para = {
                verifyCode: verifyCode,
                typeId: typeId
            }
            $.post(Constant.ctx("/mulanweb/seller/verify/codeVerify"), para, function (info) {
                if (info.ReturnCode == 1) {
                    $("#verifyCode").val("");
                    Constant.alert(info.AlertMessage||info.message||"Verify the success, the number is","");
                } else {
                    Constant.alert(info.AlertMessage||info.message||"Validation failure","");
                }
            });
            myApp.hidePreloader();
            mainView.router.refreshPage() ;
        }else{
            Constant.alert('Please input verify code!');
        }
    }
</script>
</body>
</html>
